<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>创业者服务首页</title>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css"/>
    <link rel="stylesheet" href="../css/leftSidebar.css">
</head>
<style type="text/css">
    html,body{height: 100%;}
    .col-xs-12.nav_right{padding: 0;height: 100px;padding-right: 0;margin-right: 0;min-width: 1300px;height: 100px;padding-right: 0;margin-right: 0;padding-left: 160px;}
    #myTab a{color: #7c7c7c;font-family: "微软雅黑";font-size: 15px;}
    #myTab>li.active>a{color: #3f4142; background-color: #fff;}
    .navbar-form{margin-top: 0;}
    .tab_creat .active{color:#6bc50d;}
    .table>tbody>tr.active>td, .table>tbody>tr.active>th, .table>tbody>tr>td.active, .table>tbody>tr>th.active, .table>tfoot>tr.active>td, .table>tfoot>tr.active>th, .table>tfoot>tr>td.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>thead>tr.active>th, .table>thead>tr>td.active, .table>thead>tr>th.active{background-color: #fff;}
    .table>tfoot>tr.active>td{background-color: #fff;}
    .table>tbody>tr>td{border-top:0;}
    .table{margin-bottom: 0;}
    div.tab_creat.row{background-color: #fff;}
    .tab_font{padding: 10px 0;}
    .tab_font div,.tab_font td{font-size: 14px;color: #919191;}
    .gongsi_list div.col-xs-2,.gongsi_list div.col-xs-1,.gongsi_list div.col-xs-4{text-align: center;padding: 20px 0;}
    .gongsi_list.row{background-color: #fff;margin-top: 20px;}
    .gongsi_list dd div.col-xs-2{font-size: 14px;color: #4f5051;}
    .row{margin: 0;}
    .sub_logo{position: relative;display: inline-block;padding-left: 0;}
    .sub_logo input{opacity: 0;position: absolute;left: 0;right: 0;bottom: 0;top: 0;}
    .zhube_head{border-bottom: 1px solid #ddd;}
    .zhube_head h3{padding: 5px 0;,font-family: "微软雅黑";color: #222c38;font-size: 16px;border-bottom: 4px solid #5a626d;}

    #form_test label{font-size: 14px;font-family: "微软雅黑";color: #515151;font-weight: normal;}
    #form_test  .media-middle{font-size: 14px;color: #acacac;}
    .form_tip{font-size: 12px;color: #acacac;font-family: "微软雅黑";}
    .btn-default{border-color: #d5272d ;color: #d5272d ;}
    .btn-default.disabled{background-color: #ccc;color: #fff;border-color:#ccc;}
    .btn-default.disabled.focus, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled].focus, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover{background-color: #ccc;color: #fff;}
    .label.label-success{color: #6bc50d;background-color: #efffdf;font-weight: normal;}
    .media-body p{padding: 20px 0;}
    .xq_bg{background-color: #fff;padding: 20px 0;}

    /*详情界面*/
    #navbar-example{border: 0;background-color: #fff;}
    #navbar-example .nav-pills>li.active>a{border-bottom: 4px solid #d5272d  ; background-color: #fff;border-radius: 0;color: #222c38;}
    #navbar-example .nav-pills>li>a{font-size: 22px;color: #5a626d;}
    .progress_jieshao h4{font-size: 22px;border-left: 4px solid #222c38;padding: 0 10px;margin-top: 20px;}
    .progress_jieshao p{font-size: 18px;color: #5a626d;line-height: 30px;padding:0 10px;}
    .progress_jieshao section{font-size: 18px;color: #5a626d;padding: 0 10px;}
    .panel_name{font-size: 16px; color: #969fa8;padding: 0 10px;}
    .panne_exp ul>li{margin: 20px 0;}
    .panne_exp ul>li:last-child{margin-top: 10px;}
    .panel-title{font-size: 24px;color: #222c38;font-weight: bold;}

</style>
<body style="background-color: #f2f2f2;">
<div class="row warp" style="height: 100%;">
    <div class="nav_right_head">
        <a href="../index.html"><img src="../img/roleIndexBg.jpg"/></a>
    </div>
    <!--左侧导航-->
    <div class="col-xs-2 nav_left">
        <div class="creatNav">导师服务</div>
        <div class="creatLoginStatus"><img src="../img/avtar.png"><a>您好，导师</a></div>
        <div class="list-group" style="padding: 0;">
            <a href="daoshi_index.html" class="list-group-item active"><i class="glyphicon glyphicon-home"></i> 首页</a>
            <!--<a href="daoshirenzheng_1.html" class="list-group-item"><i class="glyphicon glyphicon-education"></i> 导师认证</a>-->
            <a href="daoshi_yxxm.html" class="list-group-item"><i class="glyphicon glyphicon-folder-open"></i> 已选项目</a>
            <a href="daoshi_gzxm.html" class="list-group-item"><i class="glyphicon glyphicon-question-sign"></i> 关注项目</a>
            <a href="daoshi_mynews.html" class="list-group-item" ><i class="glyphicon glyphicon-book"></i>  我的消息</a>
            <a href="daoshi_lingyudongtai.html" class="list-group-item"><i class="glyphicon glyphicon-send"></i> 领域动态</a>
        </div>
        <div class="backBtn"> <a href="../index.html"><img src="../img/backIndex.png"></a></div>
    </div>

    <div class="col-xs-12 nav_right">


        <div class="row">
            <div class="xq_bg" style="">

                <div class="row">
                    <div class="col-xs-5 col-xs-offset-1">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img class="media-object toturLogo" src="../img/020.jpg" onerror="onErrorHandle(this)" style="width: 140px;height: 140px;" >
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading" style="padding-top: 20px;">导师昵称 <small>导师学历</small></h4>
                                <p></p>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <nav id="navbar-example" class="navbar navbar-default navbar-static" role="navigation">
            <div class="row">
                <div class="bs-js-navbar-scrollspy col-xs-10 col-xs-offset-1">
                    <ul class="nav nav-pills navbar-left">
                        <li class="active"><a href="#introduce">导师信息</a></li>
                        <li><a href="#experience">辅导案例</a></li>
                    </ul>

                </div>

            </div>

        </nav>

        <div class="col-xs-10 col-xs-offset-1">
            <div data-spy="scroll" data-target="#navbar-example" data-offset="0"  style=" position: relative;">
                <div class="panel panel-default progress_jieshao">
                    <div class="panel-heading">
                        <h3 class="panel-title" id="introduce">导师信息</h3>
                    </div>
                    <div class="panel-body">
                        <ul class="list-unstyled" id="tutorDetailList">
                            <li>
                                <h4>研究领域</h4>
                                <div class="panel_name"><span>无人机、物联网</span></div>
                            </li>
                        </ul>
                    </div>
                </div>



                <!--我的项目-->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title " id="experience">辅导案例</h3>
                    </div>
                    <div class="panel-body" style="padding: 0;">
                        <div class="row gongsi_list">
                            <dl style="background-color: #fff;">
                                <dt>
                                <div class="row">
                                    <div class="col-xs-4" style="text-align: left;padding-left: 15px;">创业公司</div>
                                    <div class="col-xs-2">融资阶段</div>
                                    <div class="col-xs-2">创业领域</div>
                                    <div class="col-xs-1">导师</div>
                                    <div class="col-xs-2">过往投资方</div>
                                    <div class="col-xs-1">操作</div>

                                </div>
                                </dt>
                                <dd>
                                    <div class="row">
                                        <div class="col-xs-4" style="padding-top: 10px;">
                                            <div class="media">
                                                <div class="media-left media-middle" style="padding: 0px 15px;">
                                                    <img src="../img/carous.png" style="width: 40px;height: 40px;"/>
                                                </div>
                                                <div class="media-body text-left">
                                                    <span style="display: inline-block;margin-top: 10px;">小橙科技</span>

                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-2">201703024</div>
                                        <div class="col-xs-2">生活消费</div>
                                        <div class="col-xs-1">王西军</div>
                                        <div class="col-xs-2">无</div>
                                        <div class="col-xs-1">关注</div>


                                    </div>

                                </dd>
                                <dd>
                                    <div class="row">
                                        <div class="col-xs-4" style="padding-top: 10px;">
                                            <div class="media">
                                                <div class="media-left media-middle" style="padding: 0px 15px;">
                                                    <img src="../img/carous.png" style="width: 40px;height: 40px;"/>
                                                </div>
                                                <div class="media-body text-left">
                                                    <span style="display: inline-block;margin-top: 10px;">小橙科技</span>

                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-2">201703024</div>
                                        <div class="col-xs-2">生活消费</div>
                                        <div class="col-xs-1">王西军</div>
                                        <div class="col-xs-2">无</div>
                                        <div class="col-xs-1">关注</div>


                                    </div>

                                </dd>
                                <dd>
                                    <div class="row">
                                        <div class="col-xs-4" style="padding-top: 10px;">
                                            <div class="media">
                                                <div class="media-left media-middle" style="padding: 0px 15px;">
                                                    <img src="../img/carous.png" style="width: 40px;height: 40px;"/>
                                                </div>
                                                <div class="media-body text-left">
                                                    <span style="display: inline-block;margin-top: 10px;">小橙科技</span>

                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-xs-2">201703024</div>
                                        <div class="col-xs-2">生活消费</div>
                                        <div class="col-xs-1">王西军</div>
                                        <div class="col-xs-2">无</div>
                                        <div class="col-xs-1">关注</div>


                                    </div>

                                </dd>
                            </dl>
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
</div>
</body>
<script src="../js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js" ></script>
<script type="text/javascript" src="../js/public.js"></script>
<script type="text/javascript">
    var person = JSON.parse(sessionStorage.getItem("person"));
    if (person==''||person==null) {
        alert('请先登录')
        window.location.href='denglu.html';
    } else{
        var userId = person.userid;
    }





    console.log(userId)
    var id = location.href.split('?')[1];
    console.log(id)
    //我的项目列表
    $.ajax({
        type: "get",
        url:"http://114.112.96.184:18080/view/tutor/"+id,
        data:{'userId':userId},
        error: function(request) {
            console.log("Connection error");
        },
        success: function(data) {
            console.log(data)
            var obj = data.result.tutor;
            $('.toturLogo').attr('src',obj.avatar);
            var tutorName =obj.realName
            $('.media-body h4').html(tutorName);
//				var tutorTel = obj.tel
//				$('.media-body.pbIntroduce p').html(tutorTel);
            var attention='';
            if (obj.attention==true) {
                attention='取消关注'
            } else{
                attention='关注'
            }
            $('.attentionTutor').text(attention);
            var tutorDetailContent='';
            tutorDetailContent= '<li><h4>研究领域</h4>'+
                    '<p>'+obj.researchField+'</p>'+
                    '</li>'+
                    '<li><h4>所在地区</h4>'+
                    '<p>'+obj.area+ '</p>'+
                    '</li>'+
                    '<li><h4>学历</h4>'+
                    '<section>'+obj.education+ '</section>'+
                    '</li>'+
                    '<li> <h4>工作单位</h4>'+
                    '<section>'+ obj.dept+ '</section>'+
                    '</li>'+
                    '<li> <h4>职称</h4>'+
                    '<section>'+obj.title+'</section>'+
                    '</li>'+
                    '<li> <h4>获奖经历</h4>'+
                    '<section>'+obj.awards+'</section>'+
                    '</li>';

            $('#tutorDetailList').html(tutorDetailContent)
//				if(!objPb.company){
//					$('.panel_name').hide();
//				}
//
//				if(objPb.open==0){
//					$('.businessPlan').hide();
//				}
        }




    });

    $(document).on('click','.attentionTutor',function () {
        if (person==''||person==null) {
            window.location.href='denglu.html';
            return;
        }
        if ($(this).text()=='我'){
            return false;
        }
        var id = $(this).attr('attentionId');
        if($(this).text()=='关注'){
            $(this).text('取消关注')
        }else {
            $(this).text('关注')
        }
        attentionTutor();
        function attentionTutor() {
            $.ajax({
                type: "post",
                data:{'userId':userId},
                url:"http://114.112.96.184:18080/auth/attentionTutor/"+id,
                async: true,
                error: function(request) {
                    console.log("Connection error");
                },
                success: function(data) {
                    console.log(data);
                }
            });
        }

    });

    function onErrorHandle(obj){
        obj.src="../img/defaultAvatar.png";
    }



</script>
</html>
